﻿<?xml version="1.0" encoding="utf-8" ?>
<SourceAnalyzer Name="CodeQualityRules">
    <Description>Best practices for better coding.</Description>
    <Rules>
        <RuleGroup Name="Hydra Code Quality Improvements">
            <Rule Name="ConstructorMustNotHaveMoreThanFourParameters" CheckId="HD1000">
                <Context>The constructor '{0}' takes {1} arguments. More than 4 arguments are considered a code smell.</Context>
            </Rule>
            <Rule Name="MethodMustNotHaveMoreThanFourParameters" CheckId="HD1001">
                <Context>The method '{0}' takes {1} arguments. More than 4 arguments are considered a code smell.</Context>
            </Rule>
            <Rule Name="IncorrectRethrow" CheckId="HD1002">
                <Context>Incorrect re-throw of an exception in method '{0}'. Replace 'throw {1};' with 'throw;'</Context>
            </Rule>
            <Rule Name="DontUseDefaultOperator" CheckId="HD1003">
                <Context>Do not use 'default({0})'. Use 'Default.Value&lt;{0}&gt;()' instead.</Context>
            </Rule>
            <Rule Name="AsyncMethodsMustReturnTask" CheckId="HD1004">
                <Context>The method '{0}' is asynchronous but does not return an awaitable. Make it return 'System.Threading.Tasks.Task'.</Context>
            </Rule>
            <Rule Name="DontDeclareSetOnlyProperties" CheckId="HD1005">
                <Context>Do not declare set-only properties. Either add a getter or switch to a dedicated set-method ('{0} void Set{1}({2})').</Context>
            </Rule>
        </RuleGroup>
    </Rules>
</SourceAnalyzer>